/*
 *  This file is part of LifeBudget - Copyright 2010 Clifton Eaton
 *  ------------------------------------------------------------------
 *  LifeBudget is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  LifeBudget is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with LifeBudget.  If not, see <http://www.gnu.org/licenses/>.
 */
package org.lifebudget.app.client.mvc.model;

import java.io.Serializable;

/**
 * Captures the login information for a user.  Used as an abstraction
 * over top of the Google User.  Contains information related to the user,
 * user-specific details as well as urls pertaining to logging in and logging out.
 * 
 * Serves as model object to the view as well as a Data Transfer Object and 
 * therefore, meant to be used only in the client code or for communicating 
 * to through GWT RPC.
 */
public class LoginInfo implements Serializable {
	
	/** The logged in status. */
	private boolean loggedIn = false;
	
	/** The login url. */
	private String loginUrl;
	
	/** The logout url. */
	private String logoutUrl;
	
	/** The user's email address. */
	private String emailAddress;
	
	/** The user's nickname. */
	private String nickname;

	/**
	 * Checks if the user is logged in.
	 *
	 * @return true, if the user is logged in
	 */
	public boolean isLoggedIn() {
		return loggedIn;
	}

	/**
	 * Sets the user's logged in status.
	 *
	 * @param loggedIn whether the user is logged in or not.
	 */
	public void setLoggedIn(boolean loggedIn) {
		this.loggedIn = loggedIn;
	}

	/**
	 * Gets the login url.
	 *
	 * @return the login url
	 */
	public String getLoginUrl() {
		return loginUrl;
	}

	/**
	 * Sets the login url.
	 *
	 * @param loginUrl the new login url
	 */
	public void setLoginUrl(String loginUrl) {
		this.loginUrl = loginUrl;
	}

	/**
	 * Gets the logout url.
	 *
	 * @return the logout url
	 */
	public String getLogoutUrl() {
		return logoutUrl;
	}

	/**
	 * Sets the logout url.
	 *
	 * @param logoutUrl the new logout url
	 */
	public void setLogoutUrl(String logoutUrl) {
		this.logoutUrl = logoutUrl;
	}

	/**
	 * Gets the email address.
	 *
	 * @return the email address
	 */
	public String getEmailAddress() {
		return emailAddress;
	}

	/**
	 * Sets the email address.
	 *
	 * @param emailAddress the new email address
	 */
	public void setEmailAddress(String emailAddress) {
		this.emailAddress = emailAddress;
	}

	/**
	 * Gets the nickname.
	 *
	 * @return the nickname
	 */
	public String getNickname() {
		return nickname;
	}

	/**
	 * Sets the nickname.
	 *
	 * @param nickname the new nickname
	 */
	public void setNickname(String nickname) {
		this.nickname = nickname;
	}

}
